import config from '@/utils/config'
import { generateRequest } from '@/utils/request'
const { apiUrlPrefix } = config

/** 医院列表 */
export const hospitalListApi = generateRequest(`${apiUrlPrefix}/pcs/hospital/list`)

/** 新增医院 */
export const createHospitalApi = generateRequest(`${apiUrlPrefix}/pcs/hospital`)

/** 删除医院 */
export const deleteHospitalApi = generateRequest(`${apiUrlPrefix}/pcs/hospital/{id}`, 'delete')

/** 医院院区列表 */
export const hospitalAreaListApi = generateRequest(`${apiUrlPrefix}/pcs/hospitalArea/list`)

/** 新增医院院区 */
export const createHospitalAreaApi = generateRequest(`${apiUrlPrefix}/pcs/hospitalArea`)

/** 更新医院院区 */
export const updateHospitalAreaApi = generateRequest(`${apiUrlPrefix}/pcs/hospitalArea/{id}`, 'put')

/** 删除医院院区 */
export const deleteHospitalAreaApi = generateRequest(`${apiUrlPrefix}/pcs/hospitalArea/{id}`, 'delete')

/** 医院院区树 */
export const hospitalAndAreaTreeApi = generateRequest(`${apiUrlPrefix}/pcs/hospitalArea/hospitalAndAreaTree`, 'get')

/** 根据id获取医院院区名称 */
export const getHospitalAndAreaNamesByIdsApi = generateRequest(
  `${apiUrlPrefix}/pcs/hospitalArea/getHospitalAndAreaNamesByIds`,
)
